﻿using System;
using System.Collections.Generic;
using RFS.BizLogic.utils;

namespace RFS.BizLogic.Sys.impl
{
    public class Sys : ISys
    {
        private ILog _log;


        public void Exist()
        {
            
            Exited?.Invoke(this, new EventArgs());
        }

        public event EventHandler Exited;

    }

    public enum SysState
    {
        Initializing,
        Ready,
        Buz,
        Failed,
    }

    public static class Ex
    {
        static Dictionary<SysState, String> _sysStates = new Dictionary<SysState, string>()
        {
            { SysState.Initializing, "初始化中" },
            { SysState.Ready, "就绪" },
            { SysState.Buz, "忙" },
            { SysState.Failed, "异常" },
        };

        public static string ToName(this SysState o )
        {
            return _sysStates[o];
        }
    }
}